<template>
<div>
  <FormDetailNoImg :dataModel="[dataModel.detailShowInfo]" />
  <FormDetailNoImg :dataModel="[dataModel.checkDeviceShowInfo]" />
  <FormDetailNoImg :dataModel="[dataModel.checkOperateShowInfo]" />
  <FormDetailNoImg :dataModel="[dataModel.checkItemsShowInfo]" />
</div>
</template>

<script>
import FormDetailNoImg from '@/components/formEdit/formDetailNoImg'
export default {
components:{FormDetailNoImg},
props:["dataModel"],
created(){
  console.log("++++++++++++")
    console.log(this.$route.fullPath)
    const id=localStorage.getItem(this.$route.fullPath)
    this.$store.dispatch("device_pointcheck_plan/requestDetailInfo",id).then(
      res=>{
         //组装展示的数据到结构中
         console.log("查询的点检详情",res.data)
         //基础信息
         this.dataModel.detailShowInfo.content.forEach(e=>{
           //把请求的值赋给常量
           e.value=(res.data)[e.name]
         })
         //点检设备
         this.dataModel.checkDeviceShowInfo.tableData=res.data.planRefDeviceList
         //点检人员,产品改为了表格- -
         this.dataModel.checkOperateShowInfo.tableData=[res.data]
         //点检项
         this.dataModel.checkItemsShowInfo.tableData=res.data.planItemList
         console.log("点检详情",this.dataModel)
      }
    ).catch(err=>{

    })  
}
}
</script> 